
' Copyright (c) 2015 ZZZ Projects. All rights reserved
' Licensed under MIT License (MIT) (https://github.com/zzzprojects/Z.ExtensionMethods)
' Website: http://www.zzzprojects.com/
' Feedback / Feature Requests / Issues : http://zzzprojects.uservoice.com/forums/283927
' All ZZZ Projects products: Entity Framework Extensions / Bulk Operations / Extension Methods /Icon Library


Public Module Extensions_209

	''' <summary>
	'''     Returns the angle whose tangent is the quotient of two specified numbers.
	''' </summary>
	''' <param name="y">The y coordinate of a point.</param>
	''' <param name="x">The x coordinate of a point.</param>
	''' <returns>
	'''     An angle, ?, measured in radians, such that -?????, and tan(?) =  / , where (, ) is a point in the Cartesian
	'''     plane. Observe the following: For (, ) in quadrant 1, 0 &lt; ? &lt; ?/2.For (, ) in quadrant 2, ?/2 &lt;
	'''     ???.For (, ) in quadrant 3, -? &lt; ? &lt; -?/2.For (, ) in quadrant 4, -?/2 &lt; ? &lt; 0.For points on the
	'''     boundaries of the quadrants, the return value is the following:If y is 0 and x is not negative, ? = 0.If y is
	'''     0 and x is negative, ? = ?.If y is positive and x is 0, ? = ?/2.If y is negative and x is 0, ? = -?/2.If  or
	'''     is , or if  and  are either  or , the method returns .
	''' </returns>
	<System.Runtime.CompilerServices.Extension> _
	Public Function Atan2(y As [Double], x As [Double]) As [Double]
		Return Math.Atan2(y, x)
	End Function
End Module


